# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=honggfuzz
pkgver=4142.7c495f83
pkgrel=1
groups=('blackarch' 'blackarch-fuzzer' 'blackarch-hardware')
pkgdesc='A general-purpose fuzzer with simple, command-line interface.'
arch=('x86_64' 'aarch64')
url='https://code.google.com/p/honggfuzz/'
license=('Apache')
depends=('binutils' 'libunwind')
makedepends=('git')
source=("git+https://github.com/google/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  CFLAGS="" make
}

package() {
  cd $pkgname

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md CHANGELOG
  install -Dm 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

